package com.ailsa.learningsystem.pojo;

import java.io.Serializable;

/**
 * @Author 冉冉
 * @Version 1.0
 * Course课程实体类为了实现课程的操作【删除，查询，修改，添加】
 */

public class Course implements Serializable {
    private static final long serialVersionUID=1L;
    //课程编号
    private int courseId;
    //课程名称
    private String courseName;
    //课程类别
    private String courseType;
    //课时总数
    private int courseCount;
    //课程时长
    private String  duration;
    //讲师昵称
    private String teacherName;
    //setter和getter快捷键：ALT+Insert或者Fn+ALT+Insert

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public int getCourseCount() {
        return courseCount;
    }

    public void setCourseCount(int courseCount) {
        this.courseCount = courseCount;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }
    /**
     * 构造方法：无参构造方法和有参构造方法
     * 1.如果设置了有参的构造方法，无参构造方法也必须设计，自带的构造方法将不能再使用
     * 2.如果没有设置参的构造方法，那么无参构造方法可以不设置，将使用自带的构造方法
     * 构造方法的快捷键：ALT+Insert或者Fn+ALT+Insert
     */
    public Course(int courseId, String courseName, String courseType, int courseCount, String duration, String teacherName) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.courseType = courseType;
        this.courseCount = courseCount;
        this.duration = duration;
        this.teacherName = teacherName;
    }

    public Course() {
    }
    /**
     * toString方法：可以自定义，也可以直接ALT+Insert或者Fn+ALT+Insert
     */
    @Override
    public String toString() {
        StringBuffer stringBuffer=new StringBuffer();
        stringBuffer.append(this.courseId);
        stringBuffer.append("\t");
        stringBuffer.append(this.courseName);
        stringBuffer.append("\t");
        stringBuffer.append(this.courseType);
        stringBuffer.append("\t");
        stringBuffer.append(this.courseCount);
        stringBuffer.append("\t");
        stringBuffer.append(this.duration);
        stringBuffer.append("\t");
        stringBuffer.append(this.teacherName);
        return stringBuffer.toString();
    }
}
